package admin

import (
	"context"
	"server/internal/model"
	"server/internal/service"

	"server/api/admin/system"
)

func (c *ControllerSystem) CrontabCategoryCreate(ctx context.Context, req *system.CrontabCategoryCreateReq) (res *system.CrontabCategoryCreateRes, err error) {
	res = new(system.CrontabCategoryCreateRes)
	res.ID, err = service.SystemCrontabCategory().Create(ctx, model.SystemCrontabCategoryCreateInput{
		Name:   req.Name,
		Remark: req.Remark,
	})
	return
}
